﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FRL.DebtChased.AgentEditor
{

	/// <summary>
	/// Declaration of Pause class
	/// </summary>
	public class Pause
	{

		/////////////////////////////////////////////////////////////
		// Attributes

		private int m_iTock;

		/////////////////////////////////////////////////////////////
		// Construction

		public Pause(int iTicks)
		{

			// Initialize member variables
			m_iTock = Environment.TickCount + iTicks;

		}

		/////////////////////////////////////////////////////////////
		// Operations

		public void Wait()
		{

			// Wait for tock
			while (Environment.TickCount < m_iTock)
				System.Threading.Thread.Sleep(25);

		}

	}

}
